package com.arithmetic;

import android.util.Log;

import com.DataProcess.Robot;
import com.pudu.json.MapDecode;
import com.pudu.pdrobot.App;

import org.json.JSONException;

/**
 * Created by tjpu on 2016/10/12.
 */
public class InitMap {
    public static void initMap() {
        String string = App.instance.getApplicationAtlasData();
        MapDecode map = new MapDecode();
        if (string != null) {
            try {
                map.decode(string);
                Robot.uwbStation = map.getUWBArray();
                Robot.track = map.getTrackArray();
                Robot.trackWeight = map.getTrackWeightArray();
                Robot.sourcePos = map.getSource();
                Log.i("init map","init map succeed");
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }
}
